function [res] = erfcc(x)
% returns the complementary error function erfc(x) with fractional error
% everywhere less than 1.2*10^-7
% Press et al., p221.
z=abs(x);
t=1/(1+0.5*z);
res=t*exp(-z*z-1.26551223+t*(1.00002368+t*(0.37409196+t*(0.09678418+t*(-0.18628806+t*(0.27887807)...
+t*(-1.13520398+t*(1.48851587+t*(-0.82215223+t*0.17087277))))))));
if(x<0)
	res = 2.0-res;
end
return;	
